﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Reader.UC
{
    /// <summary>
    /// Interaction logic for MenuControl.xaml
    /// </summary>
    public partial class MenuControl : UserControl
    {
        public delegate void MenuEvent(object sender, EventArgs e);
        public event MenuEvent OnMenuBtn_Click;
        public MenuControl()
        {
            InitializeComponent();
        }

        private void ReadingBtn_Click(object sender, RoutedEventArgs e)
        {
            if (this.OnMenuBtn_Click != null)
                this.OnMenuBtn_Click(sender, e);
        }

        private void LibraryBtn_Click(object sender, RoutedEventArgs e)
        {
            if (this.OnMenuBtn_Click != null)
                this.OnMenuBtn_Click(sender, e);
        }

        private void OpenBtn_Click(object sender, RoutedEventArgs e)
        {
            if (this.OnMenuBtn_Click != null)
                this.OnMenuBtn_Click(sender, e);
        }

        private void ConvertBtn_Click(object sender, RoutedEventArgs e)
        {
            if (this.OnMenuBtn_Click != null)
                this.OnMenuBtn_Click(sender, e);
        }

        private void CloseBtn_Click(object sender, RoutedEventArgs e)
        {
            Application.Current.Shutdown();
        }
    }
}
